package com.woniuxy.oa.mapper;

import java.sql.SQLException;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

@ControllerAdvice
public class MapperException {
		
	@ExceptionHandler(SQLException.class)
	public ModelAndView dealMapperException() {
		ModelAndView mv=new ModelAndView();
		mv.addObject("msg", "账号不存在");
		System.out.println(666+"Exception");
		mv.setViewName("login");
		return mv;
	}
}
